import { defineStore } from 'pinia';

const useGlobalStore = defineStore('global', {
  state: () => ({
    isDarkMode: false,
    userInfo: {},
    token: '',
  }),
  getters: {
    getIsDarkMode(state) {
      return state.isDarkMode;
    },
  },
  actions: {
    setDarkMode(isDarkMode) {
      this.isDarkMode = isDarkMode;
    },
  },
});

export default useGlobalStore;
